<?php

namespace app\admin\job;

use app\common\service\CloudService;
use app\common\service\ConfigService;
// use think\queue\Job;
use dengje\workerman\process\queue\Client as Job;
use app\admin\service\system\PluginService;
use app\common\model\NoticeModel;
use app\common\model\user\UserModel;

class NoticeJob
{
    private $process = null;

    public function fire($data)
    {
        if ($data['type'] == 0) $data['uids'] = UserModel::where('status', 1)->column('id');
        foreach ($data['uids'] as $v) {
            (new NoticeModel())->send($v, $data['title'], $data['content']);
        }
      
    }

    public function failed($data)
    {

        // ...任务达到最大重试次数后，失败了
    }
}
